﻿<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="E.Silverlight.Study.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Height="720" Width="950" BorderBrush="#FFEBF7F4" BorderThickness="1">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="600"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Background="#FFF1F1F1">
            <TextBlock Name="courseName" Text="" FontSize="18" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="11,5,0,0"></TextBlock>
            <TextBlock FontSize="13" HorizontalAlignment="Left" Margin="10,31,0,0" Name="content" Text="" VerticalAlignment="Top" Foreground="#FF666666" />
            <telerik:RadButton Content="保存学习进度" Height="40" HorizontalAlignment="Left" Margin="843,0,0,0" Name="button4" VerticalAlignment="Center" Width="96" Click="button4_Click" IsEnabled="False" CornerRadius="5" />
        </Grid>
        <Border Grid.Row="1" BorderThickness="1" BorderBrush="#FFC8DBD3">
            <Grid  Grid.Row="1">
                <Grid.Resources>
                    <Storyboard  x:Name="sbDisplay">
                        <DoubleAnimation   From="0" To="0.90" Duration="00:00:0.5" 
                            Storyboard.TargetName="flowBorder" 
                            Storyboard.TargetProperty="Opacity" >
                        </DoubleAnimation>
                        <DoubleAnimation   From="0" To="1" Duration="00:00:0.5" 
                            Storyboard.TargetName="videoBorder" 
                            Storyboard.TargetProperty="Opacity" >
                        </DoubleAnimation>
                    </Storyboard>
                    <Storyboard  x:Name="sbClose">
                        <DoubleAnimation   From="1" To="0.0" Duration="00:00:0.5" 
                            Storyboard.TargetName="videoBorder" 
                            Storyboard.TargetProperty="Opacity" >
                        </DoubleAnimation>
                    </Storyboard>

                </Grid.Resources>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="730"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Border x:Name="pptBorder" BorderThickness="1"  BorderBrush="#FFC8DBD3">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="550"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                            <telerik:RadBusyIndicator IsBusy="False" x:Name="busy" BusyContent="正在加载...">
                                <Image  Height="540" Width="720" HorizontalAlignment="Center"  Name="image1" Stretch="Fill" VerticalAlignment="Center"  />
                            </telerik:RadBusyIndicator>
                            <Grid Grid.Row="1" Background="#FFEDF8F4">
                           
                            <TextBox Height="23" HorizontalAlignment="Left" Margin="331,12,0,0" Name="pageTextBox" VerticalAlignment="Top" Width="40" KeyUp="pageTextBox_KeyUp" Text="1" IsEnabled="False" />
                            <TextBlock Height="23" HorizontalAlignment="Left" Margin="375,15,0,0" Name="totalPages" Text="/" VerticalAlignment="Top" />
                            <telerik:RadButton Margin="10,5,0,5"  HorizontalAlignment="Left" Click="button3_Click" IsEnabled="False" Name="button3"  VerticalAlignment="Center" CornerRadius="5" Width="70">
                                <ContentControl>
                                    <StackPanel Orientation="Horizontal">
                                        <Image Source="/E.Silverlight.Study;component/Images/edit.png"  Stretch="Uniform" ></Image>
                                        <TextBlock Text="书签" VerticalAlignment="Center"></TextBlock>
                                    </StackPanel>
                                </ContentControl>
                            </telerik:RadButton>
                            <telerik:RadButton Margin="278,0,0,0" Name="button1" HorizontalAlignment="Left" BorderBrush="#00848484" IsEnabled="False" Click="button1_Click" VerticalAlignment="Center" CornerRadius="10">
                                <ContentControl>
                                    <Image x:Name="imageP" Source="/E.Silverlight.Study;component/Images/button-back.png"  Stretch="Uniform" ></Image>
                                    </ContentControl>
                                <telerik:RadButton.Background>
                                    <SolidColorBrush />
                                </telerik:RadButton.Background>
                            </telerik:RadButton>
                            <telerik:RadButton Margin="409,0,0,0" Name="button2" HorizontalAlignment="Left" BorderBrush="#00848484" IsEnabled="False" Click="button2_Click" VerticalAlignment="Center"  CornerRadius="10">
                                <ContentControl>
                                    <Image x:Name="imageN" Source="/E.Silverlight.Study;component/Images/button-blue-next.png" ></Image>
                                </ContentControl>
                                <telerik:RadButton.Background>
                                    <SolidColorBrush />
                                </telerik:RadButton.Background>
                            </telerik:RadButton>
                        </Grid>
                </Grid>
                </Border>
                <Border x:Name="flowBorder" Visibility="Collapsed"  Background="#FF252525" Opacity="0"></Border>
                <Border x:Name="videoBorder"  Visibility="Collapsed" BorderThickness="1" Opacity="0">
                    <Canvas Margin="20,23,38,63">
                        <telerik:RadMediaPlayer x:Name="tmedia" Canvas.Top="39" AutoPlay="False" IsChaptersPanelHidden="True" IsPlaylistVisible="True" IsVideoPanelHidden="False" Height="450" Width="690" Header="欧唯特呼叫中心职业资质认证在线培训系统" IsVideoControlsPanelVisible="True" IsAutoPlaylistAdvance="False">
                            <telerik:RadMediaItem x:Name="mediaItem" Title="培训视频课件" ImageSource="/E.Silverlight.Study;component/Images/7264.png"></telerik:RadMediaItem>
                            <telerik:RadMediaItem x:Name="soundItem" Title="培训音频课件" ImageSource="/E.Silverlight.Study;component/Images/7272.png"></telerik:RadMediaItem>
                        </telerik:RadMediaPlayer>
                    </Canvas>

                </Border>
                <StackPanel Grid.Column="1">
                    <TextBlock Text="课件内容：" FontSize="13" Margin="8,10,5,5"></TextBlock>

                    <telerik:RadRadioButton x:Name="pptButton" Height="49" Margin="10,5" FontSize="16"  IsEnabled="False" Click="pptButton_Click"  CornerRadius="5" Cursor="Hand">
                        <ContentControl>
                            <StackPanel Orientation="Horizontal">
                                <Image Source="/E.Silverlight.Study;component/Images/7269.png" Width="45"></Image>
                                <TextBlock Text="PPT文档   " VerticalAlignment="Center" Margin="10,0,10,0" FontSize="16"  FontWeight="Bold"></TextBlock>
                            </StackPanel>
                        </ContentControl>
                    </telerik:RadRadioButton>
                    <telerik:RadRadioButton  x:Name="videoButton" Height="49" Margin="10,5" FontSize="16"  IsEnabled="False" Click="videoButton_Click"  CornerRadius="5" Cursor="Hand">
                        <ContentControl>
                            <StackPanel Orientation="Horizontal">
                                <Image Source="/E.Silverlight.Study;component/Images/7265.png" Width="45"></Image>
                                <TextBlock Text="多媒体文件" VerticalAlignment="Center"  Margin="10,0,10,0"  FontSize="16" FontWeight="Bold" ></TextBlock>
                            </StackPanel>
                        </ContentControl>
                    </telerik:RadRadioButton>
                    <Border x:Name="soundBorder"  Margin="10,5" Height="120" BorderThickness="1" CornerRadius="1" Visibility="Collapsed">
                        <Canvas Height="120">
                            <MediaElement x:Name="media"  Height="0" Width="0"  BufferingProgressChanged="media_BufferingProgressChanged" Loaded="media_Loaded" MediaFailed="media_MediaFailed" />
                            <Slider x:Name="slider1" Height="18" Width="195" Canvas.Left="0" Canvas.Top="12" ValueChanged="Slider_ValueChanged" Maximum="10" SmallChange="1"/>
                            <Button x:Name="btnPlay" Height="25" Width="40" Canvas.Left="0" Canvas.Top="55" Content="Play" Click="btnPlay_Click"/>
                            <Button x:Name="btnPause" Height="25" Width="40" Canvas.Left="42" Canvas.Top="55" Content="Pause" Click="btnPause_Click"/>
                            <Button x:Name="btnStop" Height="25" Width="40" Canvas.Left="84" Canvas.Top="55" Content="Stop" Click="btnStop_Click"/>
                            <TextBlock x:Name="tbCurrentTime" Height="25" Width="70" Canvas.Left="52" Canvas.Top="33" TextWrapping="Wrap" FlowDirection="RightToLeft" />
                            <TextBlock x:Name="tbTotalTime" Height="25" Width="70" Canvas.Left="122" Canvas.Top="33" TextWrapping="Wrap"/>
                            <CheckBox x:Name="cbSilent" Canvas.Left="0" Canvas.Top="85" Content="静音" RenderTransformOrigin="0.881,0.235" Checked="cbSilent_Checked" Unchecked="cbSilent_Unchecked"/>
                            <TextBlock x:Name="tbBufferingdValue" Height="55" Width="171" Canvas.Left="15" Canvas.Top="8" TextWrapping="Wrap" FontSize="18.667"/>
                            <Slider x:Name="sliderVolumn" Height="13" Width="74" Canvas.Left="50" Canvas.Top="86" Orientation="Horizontal" ValueChanged="sliderVolumn_ValueChanged" Maximum="1" LargeChange="0.2"/>
             
                        </Canvas>

                    </Border>
                </StackPanel>
            </Grid>
        </Border>


    </Grid>

</UserControl>
